import React from 'react';
import { Table } from 'antd';
import { isEmpty } from 'lodash';
import { propsType, stateType } from './data';
import css from './index.module.less';

class TableC extends React.Component<propsType, stateType> {
  constructor(props:propsType) {
    super(props);
    this.state = {};
  }

  render() {
    const {
      columns, dataSource, pagination, loading,
    } = this.props;
    return (
      <div className={css.tablec}>
        <Table
          columns={columns}
          dataSource={dataSource}
          loading={loading}
          pagination={!isEmpty(pagination) ? pagination : false}
        />
      </div>
    );
  }
}
export default TableC;
